package com.dayuanit.dy15.atm.service;

import com.dayuanit.dy15.atm.dto.CardDTO;
import com.dayuanit.dy15.atm.dto.TransferOrderDTO;
import com.dayuanit.dy15.atm.entity.Card;
import com.dayuanit.dy15.atm.entity.TransferOrder;
import com.dayuanit.dy15.atm.holder.PageHolder;

import java.util.List;

public interface CardService {

    void openaccount(String password, String confirmPwd, long userId);

    void deposit(long cardId, String password, String amount, long userId);

    void draw(long cardId, String password, String amount, long userId);

    void transfer(long cardId, String password, String amount, String cardNumIn, long userId);

    List<CardDTO> listMyCard(long userId);

    default List<TransferOrder> listTransferOrder4In() {
        return null;
    }

    default void processTransferIn(List<TransferOrder> orders) {

    }

    default Card processTransferIn(TransferOrder order) {
        return null;
    }

    default void processTransferBack(TransferOrder order) {

    }

    default void changeTransferOrder4Fail(TransferOrder order) {}

    default List<TransferOrder> listTransferOrder4Back() {
        return null;
    }

    default PageHolder<List<TransferOrderDTO>> listOrders(long userId, int currentPage, int pageSize) {
        return null;
    }

    default void cancelTransfer(long userId, long orderId) {

    }

}
